<!DOCTYPE html>
<!--引入模板引擎-->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>查询所有学生</title>
    <style type="text/css">
        #wrap {
            width: 100%;
            height: 600px;
            border: 5px solid black;
        }

        #left {
            width: 50%;
            height: 600px;
            border: 1px solid red;
            float: left;
        }

        #right {
            width: 49%;
            height: 600px;
            border: 1px solid orangered;
            float: right;
        }
    </style>
</head>
<body>
<form th:action="@{/yisa}">
    <div id="wrap">
        <div id="left">
            <label>姓名</label>
            <input type="text" name="name">
            <label>性别</label>
            <input type="radio" name="sex" value="男">男
            <input type="radio" name="sex" value="女">女
            <label>年级</label>
            <select class="form-control" name="gradeId">
                <option value="1">S1</option>
                <option value="2">S2</option>
                <option value="3">Y2</option>
            </select>
            <input type="submit" value="查询">
            <table border="1" cellspacing="0" cellpadding="10">
                <tr>
                    <th>编号</th>
                    <th>姓名</th>
                    <th>性别</th>
                    <th>年级</th>

                    <th>操作</th>
                </tr>
                <!--  @{引用路径}  #{做国际化} ${取值} *{} -->
                <tr th:each="san:${sansan}">
                    <td th:text="${san.id}">123</td>
                    <td th:text="${san.name}">Data</td>
                    <td th:text="${san.sex}">Data</td>
                    <td th:text="${san.gradeName}">Data</td>

                    <td>
                        <button><a href="javascript:void(0)" th:href="@{/student/}+${san.id}">删除</a></button>
                        <!--<a href="/uptHtml" th:href="@{/uptHtml/}+${san.id}">修改</a>-->
                        <button><a href="javascript:void(0)" th:href="@{/edit(id=${san.id})}">修改</a></button>
                    </td>
                </tr>
            </table>
            <p>当前 <span th:text="${pageInfo.pageNum}"></span> 页,总 <span th:text="${pageInfo.pages}">
            </span> 页,共 <span th:text="${pageInfo.total}"></span> 条记录</p>
            <button><a th:href="@{/yisa}">首页</a></button>
            <button><a th:href="@{/yisa(pageNum=${pageInfo.hasPreviousPage}?${pageInfo.prePage}:1)}">上一页</a></button>
            <button><a th:href="@{/yisa(pageNum=${pageInfo.hasNextPage}?${pageInfo.nextPage}:${pageInfo.pages})}">下一页</a></button>
            <button><a th:href="@{/yisa(pageNum=${pageInfo.pages})}">尾页</a></button>
            <!--<a href="/addHtml">新增</a>-->
            <button><a href="javascript:void(0)" th:href="@{/edit}">新增</a></button>
        </div>

    </div>
</form>
</body>
<script type="text/javascript" src="asserts/js/jquey-1.7.1.min.js"></script>
<script>


</script>
</html>